//package com.tianzmp.ttq.admin.security;
//
//import lombok.extern.log4j.Log4j2;
//import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
//import org.springframework.security.config.annotation.web.builders.HttpSecurity;
//import org.springframework.security.config.annotation.web.builders.WebSecurity;
//import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
//import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
//import org.springframework.security.config.http.SessionCreationPolicy;
//import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//
///**
// * @author zhumengping
// */
//@Component
//@Log4j2
//@EnableWebSecurity
//@EnableGlobalMethodSecurity(prePostEnabled = true,securedEnabled = true)
//public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
//
//    @Resource
//    private JwtVerificationFilter jwtVerificationFilter;
//
//    @Override
//    public void configure(WebSecurity web) {
//        log.info("流程2");
//        web.ignoring().antMatchers("**/**/**",
//                "/swagger-resources/**",
//                "/swagger-ui.html/**",
//                "/doc.html/**",
//                "/webjars/**",
//                "/v2/api-docs/**");
//    }
//
//    @Override
//    protected void configure(HttpSecurity http) throws Exception {
//        log.info("流程1");
//        http.cors().disable()
//                .cors()
//                .and()
//                .authorizeRequests()
//                .anyRequest().authenticated()
//                .and()
//                .addFilterAfter(jwtVerificationFilter, UsernamePasswordAuthenticationFilter.class)
//                .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);
//    }
//}
